import http from "@/utils/request";

// 集中式-搜索找房
export const concentratedFindHouse = async (data:any) => {
	return http.get<any>(`/rooms/home/concentrated-find-house`, data)
}

// 分散式-搜索找房
export const noConcentratedFindHouse = async (data:any) => {
	return http.get<any>(`/rooms/home/no-concentrated-find-house`, data)
}

// 社区-门店详情
export const getApartmentInfo = async (data:any) => {
	return http.get<any>(`/rooms/home/get-apartment-info`, data)
}

// 社区-房型详情
export const getLayoutInfo = async (data:any) => {
	return http.get<any>(`/rooms/home/get-layout-info`, data)
}

// 社区-房源详情-同小区房源
export const sameResidentialListings = async (data:any) => {
	return http.get<any>(`/rooms/home/same-residential-listings`, data)
}

// 社区-房源详情-同房源其他房间
export const otherRoomsInTheSameListing = async (data:any) => {
	return http.get<any>(`/rooms/home/other-rooms-in-the-same-listing`, data)
}

// 社区-房源详情-推荐附近房源
export const recommendListingsNear = async (data:any) => {
	return http.get<any>(`/rooms/home/recommend-listings-near-you`, data)
}

// 地图找房
export const mapfindroom = async (data:any) => {
	return http.get<any>(`/rooms/map/mapfindroom`, data)
}
// 地图找房 ，查询 区，街道 下房源
export const mapfindroom2 = async (data:any) => {
	return http.post<any>(`/rooms/map/get-street-info-by-district`, data)
}

// 查看小区房源情况
export const getapartmentareainfo = async (data:any) => {
	return http.get<any>(`/rooms/map/getapartmentareainfo`, data)
}

// 通勤时间找房
export const commutingtimefindroom = async (data:any) => {
	return http.get<any>(`/rooms/map/commutingtimefindroom`, data)
}

// 通勤距离找房
export const commutingdistancefindroom = async (data:any) => {
	return http.get<any>(`/rooms/map/commutingdistancefindroom`, data)
}

// 猜你喜欢门店列表 - 默认查询最新创建的10条
export const roomGuessList = async (data:any) => {
	return http.get<any>(`/rooms/apartment/guess-list`, data)
}

// 创建预约工单
export const reserveCreate = async (data) => {
	return http.post<any>(`/bpm/reserve/create`,data)
}

// 我的预约
export const reserveGet = async (data:any) => {
	return http.get<any>(`/bpm/reserve/get`, data)
}

// 取消预约
export const reserveCancel = async (data:any) => {
	return http.post<any>(`/bpm/reserve/cancel-reserve-ticket`, data)
}

// 获取各时间段下可租数量
export const reserveQuantity = async (data:any) => {
	return http.get<any>(`/bpm/reserve/remaining-reserve-quantity`, data)
}

// 社区-房源详情
export const getRoomHouseInfo = async (data:any) => {
	return http.get<any>(`/rooms/home/get-room-house-info`, data)
}

// 房源委托
export const personalEntrust = async (data) => {
	return http.post<any>(`/rooms/entrust/personal-entrust`,data)
}

// 获取所有地铁线路
export const metroRoute = async (data) => {
	return http.get<any>(`/rooms/map/metro-route`,data)
}

// 获取所有地铁线路
export const metroSite = async (data) => {
	return http.get<any>(`/rooms/map/metro-site`,data)
}

// 搜索框-获取房源
export const getroomsList = async (data: any) => {
	return http.get<any>(`/rooms/home/search-room`, data);
}

// 逆地理位置编码
export const latLonToAddress = async (data: any) => {
	return http.get<any>(`/rooms/baidumap/lat-lon-to-address`, data);
}

// 地点输入提示
export const locationEntryPrompt = async (data: any) => {
	return http.get<any>(`/rooms/baidumap/location-entry-prompt`, data);
}

// 查询预定账单收据列表
export const receiptPage = async (data: any) => {
	return http.get<any>(`/rooms/receipt/page`, data);
}

// 查询预定账单收据
export const receiptInfo = async (data: any) => {
	return http.get<any>(`/rooms/receipt/get`, data);
}

// 查询电子收据
export const receiptPdf = async (data: any) => {
	return http.get<any>(`/rooms/receipt/down`, data);
}
